package com.supermap.desktop.ui;

import com.supermap.desktop.Application;
import com.supermap.desktop.PluginInfo;
import com.supermap.desktop.Interface.IDefaultValueCreator;
import com.supermap.desktop.Interface.IXMLCreator;
import com.supermap.desktop.enums.XMLCommandType;

public class XMLMenuGroupCreator implements IXMLCreator {
	
	private XMLCommandBase parent;
	public XMLMenuGroupCreator(XMLCommandBase parent)
    {
        this.parent = parent;
    }

	@Override
	public XMLCommandBase createElement(XMLCommandType commandType) {
		
        XMLMenuGroup result = null;
        try {
//            PluginInfo pluginInfo = this.getDefaultValueCreator().getDefaultPluginInfo();
//            result = new XMLMenuGroup(pluginInfo, this.parent);
//            result.Key = this.getDefaultValueCreator().getDefaultKey("Group");
//            result.Text = result.Key;
//            result.Index = this.DefaultValueCreator.GetDefaultIndex();
        }catch (Exception ex) {
            Application.getActiveApplication().getOutput().output(ex);
        }

        return result;
    }

	private IDefaultValueCreator defaultValueCreator;
	@Override
	public IDefaultValueCreator getDefaultValueCreator() {
		// TODO Auto-generated method stub
		return this.defaultValueCreator;
	}

	@Override
	public void setDefaultValueCreator(IDefaultValueCreator defaultValueCreator) {
		// TODO Auto-generated method stub
		this.defaultValueCreator = defaultValueCreator;
	}

}
